import sha1 from 'js-sha1'

export default { // 工具类
  getHeaders () {
    let timestamp = new Date().getTime()
    let userId = localStorage.getItem('htxk_userId')
    let token = localStorage.getItem('htxk_token')
    let signature = sha1(userId + token + timestamp.toString())
    return {
      'X-SNS-UserId': userId,
      'X-SNS-Timestamp': timestamp,
      'X-SNS-Signature': signature,
      'X-SNS-ClientType': 1
    }
  }
}
